﻿using System;
using System.Configuration;

namespace Ext.Direct.Mvc.Configuration
{
    public class DirectSection : ConfigurationSection
    {
        [ConfigurationProperty("providerName", IsRequired = true)]
        public string ProviderName {
            get { return (string)this["providerName"]; }
        }

        [ConfigurationProperty("apiUrl", IsRequired = true)]
        public string ApiUrl {
            get { return (string)this["apiUrl"]; }
        }

        [ConfigurationProperty("routerUrl", IsRequired = true)]
        public string RouterUrl {
            get { return (string)this["routerUrl"]; }
        }

        [ConfigurationProperty("namespace", IsRequired = false)]
        public string Namespace {
            get { return (string)this["namespace"]; }
        }

        [ConfigurationProperty("assembly", IsRequired = true)]
        public string Assembly {
            get { return (string)this["assembly"]; }
        }

        [ConfigurationProperty("buffer", IsRequired = false, DefaultValue = null)]
        public int? Buffer {
            get { return (int?)this["buffer"]; }
        }
    }
}
